<?php

$tvshowsurl = @file_get_contents($url);

if ($tvshowsurl) {

	//Parse TV.com episode summary
	$subject2 = $tvshowsurl;
	$pattern2 = '#(<div id="main-col">)(\s+)([\D\d\s]+<div class="ta-r mt-10 f-bold">)#iU';
	
	preg_match($pattern2, $subject2, $matches2);
	
   	$summary = $matches2[3];

	// Get rid of extra markup
	$summary = str_replace('<div class="ta-r mt-10 f-bold">', '', $summary);
	$summary = preg_replace('#(<div>)(\s+)([\D\d\s]+</div>)#iU', '', $summary);
	$summary = preg_replace('#(<a)(\s+)([\D\d\s]+</div>)#iU', '', $summary);
	$summary = preg_replace('#(<div)(\s+)([\D\d\s]+">)#iU', '', $summary);
	$summary = str_replace('<div>', '', $summary);
	$summary=ltrim($summary);
	$summary=rtrim($summary);

}
?>